package Weapons;

import game.Config.BulletFactory;

import org.newdawn.slick.geom.Vector2f;
/**
 * This class represents a mine gun in the game.
 * The class acts precisely as a Rocketgun only that
 * the bullets don't move when fired. 
 * @author Sebastian Isheden and Victor Beer.
 */
public class MineGun extends RocketGun{

	/**
	 * Creates a mine gun with given parameters. The mine gun acts precisely
	 * as a rocketgun only with bullets that don't move (the speed of the bullets is zero).
	 * @param fireRate	The amount of times this weapon can fire per second.
	 * @param damage  The damage per shot of this weapon.
	 * @param explosionRadius The explosion radius of the bullet when it explodes.
	 */
	public MineGun(float fireRate, float damage, float explosionRadius) {
		super(fireRate, damage, 0,explosionRadius); // 0 speed
	}
	@Override
	protected void callFactory(Vector2f position, Vector2f direction) {
		BulletFactory.createMineBullet(this.damage, this.bulletSpeed, position,direction, this.explosionRadius);
	}
	/**
	 * Returns a copy of the minegun.
	 */
	@Override
	public MineGun copy(){
		return new MineGun(1/this.fireInterval,this.damage,this.explosionRadius);
	}


}
